const house = {
	// 打开命名空间
	namespaced: true,
	state: {
		currentHouse: {
			name: '武汉源码时代大楼'
		},
		footPrint: [] //足迹数组
	},
	mutations: {
		changeCurrent(state, data) {
			state.currentHouse = data;
		},
		addFootPrint(state, data) {
			//增加渲染
			// state.footPrint.push(data);
			//方案一		 findIndex==-1 
			let index = state.footPrint.findIndex(item => item.id == data.id);
			if (index == -1) {
				state.footPrint.push(data);
			}
		}
	},
	actions: {

	},
	getters: {

	}
}


export default house